package com.example.k12.http

import com.example.k12.bean.AuthInfoReq
import com.example.k12.bean.OrderReq
import com.example.k12.bean.SyncStatisticsReq
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface ApiService {
    @GET("/oms-campus-card/app/device/getDeviceInfo")
    suspend fun getDeviceInfo(@Query("deviceId") deviceId: String): ApiResponse<Any>

    @GET("/oms-campus-card/app/device/getStudent/{userId}")
    suspend fun getStudent(@Path("userId") userId: String): ApiResponse<Any>

    @POST("/oms-campus-card/app/device/getAuthinfo")
    suspend fun getAuthInfo(@Body req: AuthInfoReq, @Header("X-token") token: String): ApiResponse<Any>

    @POST("/oms-campus-card/app/device/order/pay")
    suspend fun toPay(@Body req: OrderReq, @Header("X-token") token: String): ApiResponse<Any>

    @POST("/oms-campus-card/app/device/orderStatisticsBySchoolId")
    suspend fun syncStatisticsBySchoolId(@Body req: SyncStatisticsReq, @Header("X-token") token: String): ApiResponse<Any>

    @POST("/oms-campus-card/app/device/orderStatistics")
    suspend fun getStatisticsByUserId(@Body req: SyncStatisticsReq, @Header("X-token") token: String): ApiResponse<Any>
}